package org.ruanjj.io;

import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;


public class FileExcercises {
    public static void main(String[] args) throws IOException, ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
        //1.创建一个与hello.txt在相同文件目录下的名为abc.txt文件
       File file1 = new File("hello.txt");
        String parent = file1.getAbsoluteFile().getParent();
        File file2 = new File(parent+"/abc.txt");
        file2.createNewFile();
        System.out.println(file2.exists());
    }
}
